<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.
0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.js"></script>
    <title>Document</title>
    <script>
 function mysub() {
 var username = jQuery("#username").val();
 var password = jQuery("#password").val();
 jQuery.getJSON("/login",
 {
 "username":username,
 "password":password
 },
 function (result) {
 if(result.succ==200){
 alert("返回结果："+result.msg);
 }else{
 alert("操作失败，请重试。");
 }
 });
 }
 </script>
</head>
<body>
<div style="text-align: center;">
    <h1>登录</h1>
    ⽤户：<input id="username">
    <br>
    密码：<input id="password" type="password">
    <br><br>
    <input type="button" value=" 提交 " onclick="mysub()" style="margin top: 20px ;margin-left: 50px; ">
    
</div>
</body>
</html>